Don't call gdk_pointer_grab() to change the cursor if we've already
authorOwen Taylor <otaylor@redhat.com>
Wed, 15 May 2002 22:27:42 +0000 (22:27 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 15 May 2002 22:27:42 +0000 (22:27 +0000)
Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
        call gdk_pointer_grab() to change the cursor if we've
        already ungrabbed on button release / escape.
        (#80420, Dave Camp)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkdnd.c

index 20a6be25d73ab4b82aec1490435466ca6e94184d..65f6dd728086b3156b115a363e36d37a3fc43b97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
+       call gdk_pointer_grab() to change the cursor if we've
+       already ungrabbed on button release / escape.
+       (#80420, Dave Camp)
+
 Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktooltips.c: Special case menu items to
index 20a6be25d73ab4b82aec1490435466ca6e94184d..65f6dd728086b3156b115a363e36d37a3fc43b97 100644 (file)
@@ -1,3 +1,10 @@
+Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
+       call gdk_pointer_grab() to change the cursor if we've
+       already ungrabbed on button release / escape.
+       (#80420, Dave Camp)
+
 Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktooltips.c: Special case menu items to
index 20a6be25d73ab4b82aec1490435466ca6e94184d..65f6dd728086b3156b115a363e36d37a3fc43b97 100644 (file)
@@ -1,3 +1,10 @@
+Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
+       call gdk_pointer_grab() to change the cursor if we've
+       already ungrabbed on button release / escape.
+       (#80420, Dave Camp)
+
 Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktooltips.c: Special case menu items to
index 20a6be25d73ab4b82aec1490435466ca6e94184d..65f6dd728086b3156b115a363e36d37a3fc43b97 100644 (file)
@@ -1,3 +1,10 @@
+Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
+       call gdk_pointer_grab() to change the cursor if we've
+       already ungrabbed on button release / escape.
+       (#80420, Dave Camp)
+
 Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktooltips.c: Special case menu items to
index 20a6be25d73ab4b82aec1490435466ca6e94184d..65f6dd728086b3156b115a363e36d37a3fc43b97 100644 (file)
@@ -1,3 +1,10 @@
+Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
+       call gdk_pointer_grab() to change the cursor if we've
+       already ungrabbed on button release / escape.
+       (#80420, Dave Camp)
+
 Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktooltips.c: Special case menu items to
index 20a6be25d73ab4b82aec1490435466ca6e94184d..65f6dd728086b3156b115a363e36d37a3fc43b97 100644 (file)
@@ -1,3 +1,10 @@
+Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
+       call gdk_pointer_grab() to change the cursor if we've
+       already ungrabbed on button release / escape.
+       (#80420, Dave Camp)
+
 Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtktooltips.c: Special case menu items to
index ab7b35ef46baea72df9e3d590596b2edec818a1a..0682db2b2ca443723a4773ef755aa0820ac7eb3d 100644 (file)
@@ -101,6 +101,8 @@ struct _GtkDragSourceInfo
   guint              drop_timeout;     /* Timeout for aborting drop */
   guint              destroy_icon : 1; /* If true, destroy icon_window
                                        */
+  guint              have_grab : 1;    /* Do we still have the pointer grab
+                                       */
 };
 
 struct _GtkDragDestSite 
@@ -1897,6 +1899,8 @@ gtk_drag_begin (GtkWidget         *widget,
        }
     }
 
+  info->have_grab = TRUE;
+
   return info->context;
 }
 
@@ -2456,7 +2460,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
                  }
              }
          }
-       else
+       else if (info->have_grab)
          {
            cursor = gtk_drag_get_cursor (gtk_widget_get_screen (widget),
                                          event->dnd.context->action);
@@ -3022,6 +3026,8 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
   GtkWidget *source_widget = info->widget;
   GdkDisplay *display = gtk_widget_get_display (source_widget);
 
+  info->have_grab = FALSE;
+  
   gdk_display_pointer_ungrab (display, time);
   gdk_display_keyboard_ungrab (display, time);
   gtk_grab_remove (info->ipc_widget);